package com.grape.crm.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import com.grape.crm.domain.Customer;

@Produces({"application/xml" ,"application/json"})
public interface CustomerService{
	// 查询所有未关联定区的客户
	@Path("/a")
	@GET
	public List<Customer> a();

	// 已经关联到指定定区的顾客
	@Path("/b/{b1}")
	@GET
	public List<Customer> b(@PathParam("b1") String b1);
	
	// 将所有客户关联到指定定区,客户id参数将以1,2,3的格式接受,以?xx=xx方式挂在链接后面
	@Path("c")
	@PUT
	// c1指定区id,c2指客户id
	public void c(@QueryParam("c1") String c1,@QueryParam("c2") String c2);
	
	@Path("saveOne")
	@PUT
	public void saveOne(Customer customer);
	
	@Path("/activeMail/{telephone}")
	@GET
	public Customer activeMail(@PathParam("telephone") String telephone);
	
	@Path("/login")
	@GET
	@Consumes({ "application/xml", "application/json" })
	public String login(@QueryParam("telephone") String telephone,@QueryParam("password") String password);
	
	@Path("/findDqidByAddress")
	@GET
	@Consumes({ "application/xml", "application/json" })
	public String findDqidByAddress(@QueryParam("address") String address);
}
